import { setToken, getToken, clearToken } from '@/utils/storage'
export default {
  namespaced: true,
  state: {
    token: getToken()
  },
  getters: {},
  mutations: {
    setToken(state, str) {
      state.token = str
      setToken(str)
    },
    clearToken(state) {
      state.token = null
      clearToken()
    }
  },
  actions: {}
}
